<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="spring" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <title></title>
</head>
<body>

<div class="control-group"><label class="control-label"><div align="center"> UBS - CONTACT</div> </label>
    <form:form modelAttribute="ubsContact" method="POST" cssClass="form-horizontal">

        <c:if test="${ubsContact.id > 0}">
            <div class="control-group"><label class="control-label">Id:&nbsp;&nbsp;</label><form:input path="id" readonly="true"/></div>
            <form:errors path="id"/>
        </c:if>

            <div class="control-group"><label class="control-label">Employee:&nbsp;&nbsp;</label>
                <form:select path="emp">
                <form:options items="${employee}" itemLabel="lname" itemValue="id" /></div>
                </form:select>

            </div>
            <form:errors path="emp" cssClass="error"/>

            <div class="control-group"><label class="control-label">Type:&nbsp;&nbsp;</label>
                <form:select path="contact_type" items="${cType}" itemLabel="ctype" itemValue="id"/>
            </div>
            <form:errors path="contact_type" cssClass="error"/>

            <div class="control-group"><label class="control-label">Status: &nbsp;&nbsp;</label>
                <form:radiobutton path="status" value="1"/>Active
                <form:radiobutton path="status" value="0"/>Inactive
            </div>
            <form:errors path="status" cssClass="error"/>

            <div class="control-group"><label class="control-label">Client ID:&nbsp;&nbsp;</label><form:input path="client_id" readonly="true" /></div>
            <form:errors path="client_id" cssClass="error"/>

        <div class="control-group">

        <input type="reset" value="Reset"/>
        <input type="submit" value="Save"/></div>

    </form:form>

</body>
</html>